<template>
  <div class="content">
    <div v-if="docking">
      <p>您已成功开通特约商户</p>
      <p>我司技术人员将在1-2个工作日内与您的技术联系人进行对接，请保持电话畅通，谢谢！</p>
      <a
        class="a-style"
        download
        href="https://codeload.github.com/douban/douban-client/legacy.zip/master"
      >XX接口文档</a>
      <div class="a-sty">
        <a-button type="primary" @click="closePage">关闭页面</a-button>
      </div>
    </div>
    <div class="flex-content" v-if="!docking">
      <p>您已成功开通特约商户</p>
      <img
        style="width:150px;height:150px;margin: 10px 0 30px 0;"
        src="static/img/default_avatar.png"
        alt
      />
      <div class="a-sty">
        <!-- <a-button type="primary" style="width:180px;" @click="getdown">下载收款码</a-button> -->
        <a
          class="a-down ant-btn"
          href="https://codeload.github.com/douban/douban-client/legacy.zip/master"
          download
        >下载收款码</a>
      </div>
    </div>
  </div>
</template>
<script>
import { message } from "ant-design-vue";
import api from "@/common/api";
import { error } from "util";
import { fail } from "assert";
export default {
  data() {
    return {
      docking: false,
      formItemLayout: {
        labelCol: {
          xs: { span: 24 },
          sm: { span: 7 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 12 },
          md: { span: 10 }
        }
      }
    };
  },
  beforeCreate() {
    this.form = this.$form.createForm(this);
  },
  mounted() {},
  created() {
    let docking = sessionStorage.getItem("docking");
    if (docking == "true") {
      this.docking = true;
    } else {
      this.docking = false;
    }
    console.log("this.docking", this.docking);
  },
  methods: {
    closePage() {
      if (
        navigator.userAgent.indexOf("Firefox") != -1 ||
        navigator.userAgent.indexOf("Chrome") != -1
      ) {
        window.location.href = "about:blank";
        window.close();
      } else {
        window.opener = null;
        window.open("", "_self");
        window.close();
      }
      //    this.$router.push("/SpeCustomer/step"+st);
    },
    getdown() {
      this.$axios.get("/file/file/download/" + this.imgEmblem).then(res => {
        console.log("res", res);
      });
    },
    doNext(step) {
      console.log(step);
      var st = step + 1;
      this.$router.push("/SpeCustomer/step" + st);
    },
    onChange(e) {
      console.log("radio checked", e.target.value);
      if (e.target.value == "b") {
        this.docking = false;
      } else {
        this.docking = true;
      }
    }
  }
};
</script>
<style lang="scss" scoped>
// .content {
//   // text-align: center;
// }
.flex-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.card {
  margin-top: 50px;
}
.card .title {
  text-align: center;
  padding: 20px;
  font-size: 18px;
}

.btn-next {
  margin-top: 20px;
}
.btn-style {
  background: #ccc;
  border: 1px solid #ccc;
  color: #eee;
}
.a-sty {
  text-align: center;
}
.a-style {
  font-size: 14px;
  color: #1890ff;
}
.a-down {
  width: 180px;
  display: block;
  color: #fff;
  background-color: #1890ff;
  border-color: #1890ff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
  -webkit-box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);
}
</style>



